/**
 * yeahmobi.com Inc.
 * Copyright © 2014 YeahMobi | All Rights Reserved.
 */   
    
package com.ndp.fb.scheduler.job.adpublish;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ndp.fb.constant.ConfigConst;
import com.ndp.fb.mq.api.service.schedulerservice.AppCpaAccessService;
import com.ndp.fb.scheduler.annotation.CronScheduled;

/**
 * @Title: ConnectionObjectJob.java
 * @Copyright: Copyright © 2015
 * @Description: 
 * @Company: yeahmobi
 * @Created on 下午4:16:34
 * @author giser.yang
 */
@Component
public class ConnectionObjectJob {
	private static Logger logger = LoggerFactory.getLogger(ConnectionObjectJob.class);
	@Reference
    private AppCpaAccessService appCpaAccessService;

	/**
     * 获取广告账号下面营销活动和adset数量
     */
    @CronScheduled(cronkey = ConfigConst.SCHEDULE_CONNECTIONOBJECT_CPA_ACCESS_CRON, enablekey = ConfigConst.SCHEDULE_CONNECTIONOBJECT_CPA_ACCESS_ENABLE)
    public void getAppCpaAccessInfo() {
        logger.info("获取账号app权限支持");
        appCpaAccessService.getAppCpaAccessInfo(true);
    }

}
